/*
 * spriteBase.java
 *
 * Created on November 17, 2007, 10:21 PM
 *
 * Copyright (C) 2007-2008  Hylke van der Schaaf
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, in version 3 of the License.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package hextd.creep;

import hextd.util.Geometry;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Shape;
import java.awt.Stroke;

/**
 *
 * @author hylke
 */
public class CreepRedRaver extends CreepBaseRotor {

	public static String type = "rr";
	//
	private static Color color = Color.RED;

	public CreepRedRaver() {
		super("Red Raver");
		this.rotPerTime = (float) Math.toRadians(10.0);
		this.damageColor = Creep.COLOR.RED;
		this.damageColorAnti = Creep.COLOR.GREEN;
	}

	@Override
	public String getType() {
		return type;
	}

	@Override
	public String getInfoString() {
		String retString = "";
		retString += "<h1>Red Raver</h1>" +
				"<p>" +
				"A red enemy. Red towers are very efficient at killing this one. Green ones are almost useless." +
				"</p>" +
				"<p>" + super.getInfoString() + "</p>";
		return retString;
	}

	@Override
	Color generateColor() {
		return CreepRedRaver.color;
	}

	@Override
	Stroke generateStroke() {
		return new BasicStroke(1.0f * strokeScale, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER);
	}

	@Override
	Shape generateShape() {
		float scale = paintScale * this.size.scaleMod;
		float[][] points = {
			{-scale / 4, 0},
			{+scale / 8, -scale / 8},
			{0, +scale / 4},
			{-scale / 8, -scale / 8},
			{+scale / 4, 0},
			{-scale / 8, +scale / 8},
			{0, -scale / 4},
			{+scale / 8, +scale / 8},
			{-scale / 4, 0}
		};
		return Geometry.coordsToGeneralPath(points, true);
	}

	@Override
	String getSvgName() {
		return null;
	}
}
